package lab01;

import java.util.Scanner;

public class test12 {
    public static void main(String[] args) {
        int i=0;
        Scanner scanner2=new Scanner(System.in);
        System.out.println("输入一个1-999的数字");
        i=scanner2.nextInt();
        System.out.println(String.valueOf(i).length()+"位");
        int j=0,m=0,n=i;
        while (true){
            j=i%10;
            m=m*10+j;
            i/=10;
            if (i==0)break;
        }
        if (m==n){
            System.out.println("回文");
        }
        else System.out.println("不是回文");
    }
}
